home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / emstools.arc / EMMLIB.ARC / EMM07_A.ASM < prev    next >
Assembly Source File  |  1990-02-04  |  5KB  |  92 lines

  1. ;-----------------------------------------------------------------------------;
  2. ;      MODULE NAME:   EMM07_A.ASM                                             ;
  3. ;                                                                             ;
  4. ;    FUNCTION NAME:   get_EMM_version                                         ;
  5. ;                                                                             ;
  6. ;      DESCRIPTION:   This function returns the version number of the memory  ;
  7. ;                     manager software.                                       ;
  8. ;                                                                             ;
  9. ;           PASSED:   &version:                                               ;
  10. ;                        is a far pointer to the memory manager's version     ;
  11. ;                        number.                                              ;
  12. ;                                                                             ;
  13. ;         RETURNED:   version:                                                ;
  14. ;                        is the memory manager's version number in binary     ;
  15. ;                        coded decimal (BCD) format.  The upper four bits     ;
  16. ;                        contain the integer digit of the version number.     ;
  17. ;                        The lower four bits contain the fractional digit of  ;
  18. ;                        version number.  For example, version 4.0 is         ;
  19. ;                        represented like this:                               ;
  20. ;                                        0100  0000                           ;
  21. ;                                           /   \                             ;
  22. ;                                          4  .  0                            ;
  23. ;                        When checking for a version number, an application   ;
  24. ;                        should check for a version number or greater.        ;
  25. ;                        Vendors may use the fractional digit to indicate     ;
  26. ;                        enhancements or corrections to their memory          ;
  27. ;                        managers.  Therefore, to allow for future versions   ;
  28. ;                        of memory managers, an application shouldn't depend  ;
  29. ;                        on an exact version number.                          ;
  30. ;                                                                             ;
  31. ;         RETURNED:   status:                                                 ;
  32. ;                        is the status EMM returns from the call.  All other  ;
  33. ;                        returned results are valid only if the status        ;
  34. ;                        returned is zero.  Otherwise they are undefined.     ;
  35. ;                                                                             ;
  36. ; C USE CONVENTION:   unsigned int status;                                    ;
  37. ;                     unsigned int version;                                   ;
  38. ;                                                                             ;
  39. ;                     status = get_emm_version (&version);                    ;
  40. ;-----------------------------------------------------------------------------;
  41. .XLIST
  42. PAGE    60,132
  43.  
  44. IFDEF SMALL
  45.    .MODEL SMALL, C
  46. ENDIF
  47. IFDEF MEDIUM
  48.    .MODEL MEDIUM, C
  49. ENDIF
  50. IFDEF LARGE
  51.    .MODEL LARGE, C
  52. ENDIF
  53. IFDEF COMPACT
  54.    .MODEL COMPACT, C
  55. ENDIF
  56. IFDEF HUGE
  57.    .MODEL HUGE, C
  58. ENDIF
  59.  
  60. INCLUDE emmlib.equ
  61. INCLUDE emmlib.str
  62. INCLUDE emmlib.mac
  63. .LIST
  64. .CODE
  65.  
  66. get_EMM_version        PROC                                                  \
  67.             ptr_version:FAR PTR WORD
  68.  
  69.     ;---------------------------------------------------------------------;
  70.     ;   do;                                                               ;
  71.     ;   .   get EMM version number;                                       ;
  72.     ;---------------------------------------------------------------------;
  73.     MOVE        AH, get_emm_version_fcn
  74.     INT         EMM_int
  75.  
  76.     ;---------------------------------------------------------------------;
  77.     ;   .   pass the EMM version number back to the caller;               ;
  78.     ;---------------------------------------------------------------------;
  79.     MOVE        DH:DL, 0:AL
  80.     MOVE        ES:BX, ptr_version
  81.     MOVE        ES:[BX], DX
  82.  
  83.     ;---------------------------------------------------------------------;
  84.     ;   .   return (EMM status);                                          ;
  85.     ;   end;                                                              ;
  86.     ;---------------------------------------------------------------------;
  87.     RET_EMM_STAT    AH
  88.  
  89. get_EMM_version        ENDP
  90.  
  91. END
  92.